<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<style>
  @keyframes spin {
    from {
      transform: rotate(0turn) translateY(-150px) translateY(50%) rotate(1turn)
    }
    to {
      transform: rotate(1turn) translateY(-150px) translateY(50%) rotate(0turn);
    }
  }
  
  .avatar {
    animation: spin 3s infinite linear;
  }
  /* Anything below this is just styling */
  
  .avatar {
    display: block;
    width: 50px;
    margin: calc(50% - 25px) auto 0;
    border-radius: 50%;
    overflow: hidden;
  }
  
  .path {
    width: 300px;
    height: 300px;
    padding: 20px;
    margin: 100px auto;
    border-radius: 50%;
    background: #fb3;
  }
</style>

<body>
  <div class="path">
    <img src="http://lea.verou.me/book/adamcatlace.jpg" class="avatar" />
  </div>
</body>

</html>